package cn.stylefeng.guns.sys.modular.rest.mapper;

import cn.stylefeng.guns.sys.modular.rest.entity.NameRelation;
import cn.stylefeng.guns.sys.modular.rest.model.params.NameRelationParam;
import cn.stylefeng.guns.sys.modular.rest.model.result.NameRelationResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huylei
 * @since 2022-05-18
 */
public interface NameRelationMapper extends BaseMapper<NameRelation> {


    /**
     * 根据shopCode更新数据
     * @param nameRelation
     */
    void updateByScmCode(NameRelation nameRelation);

    /**
     *  根据scmCode查询数据
     * @param shopCode
     * @return
     */
    NameRelation findByShopCode(@Param("shopCode")String shopCode);
    /**
     * 批量添加
     * @param list
     */
    void addAllList(@Param("list") List<NameRelation> list);
    /**
     * 新增
     *
     * @author huylei
     * @Date 2022-05-18
     */
    void addOne(NameRelation nameRelation);
    /**
     * 获取列表
     *
     * @author huylei
     * @Date 2022-05-18
     */
    List<NameRelationResult> customList(@Param("paramCondition") NameRelationParam paramCondition);

    /**
     * 获取map列表
     *
     * @author huylei
     * @Date 2022-05-18
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") NameRelationParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author huylei
     * @Date 2022-05-18
     */
    Page<NameRelationResult> customPageList(@Param("page") Page page, @Param("paramCondition") NameRelationParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author huylei
     * @Date 2022-05-18
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") NameRelationParam paramCondition);

    List<Map<String, String>> getName();


    List<String> getStoreIdList();
}
